home *** CD-ROM | disk | FTP | other *** search
- XCOMM $XConsortium: ibmLib.rules,v 1.9 93/12/24 11:28:07 rws Exp $
-
- /*
- * AIX shared library rules
- */
-
- #ifndef HasSharedLibraries
- #define HasSharedLibraries YES
- #endif
- #ifndef ForceNormalLib
- #define ForceNormalLib NO
- #endif
- #ifndef SharedDataSeparation
- #define SharedDataSeparation NO
- #endif
- #ifndef SharedCodeDef
- #define SharedCodeDef -DSHAREDCODE
- #endif
- #ifndef SharedLibraryDef
- #define SharedLibraryDef -DAIXSHLIB
- #endif
- #ifndef ShLibIncludeFile
- #define ShLibIncludeFile <ibmLib.tmpl>
- #endif
- #ifndef PositionIndependentCFlags
- #define PositionIndependentCFlags -bM\:SRE
- #endif
- #ifndef ExtraLoadFlags
- #define ExtraLoadFlags -bnodelcsect
- #endif
- #if ThreadedX
- #define BaseShLibReqs -lc_r -lm
- #else
- #define BaseShLibReqs -lc -lm
- #endif
-
- /*
- * SharedLibReferences - variables for shared libraries
- */
- #ifndef SharedLibReferences
- #define SharedLibReferences(varname,libname,libsource,revname,rev) @@\
- Concat3(DEP,varname,LIB) = /**/ @@\
- Concat(varname,LIB) = _Use(Concat(-l,libname),Concat(libsource/lib,libname.a)) @@\
- LintLibReferences(varname,libname,libsource)
- #endif
-
- /*
- * SharedDSLibReferences - variables for shared libraries
- */
- #ifndef SharedDSLibReferences
- #define SharedDSLibReferences(varname,libname,libsource,revname,rev) @@\
- SharedLibReferences(varname,libname,libsource,revname,rev)
- #endif
-
- /*
- * InstallSharedLibrary - generate rules to install the shared library.
- */
- #ifndef InstallSharedLibrary
- #define InstallSharedLibrary(libname,rev,dest) @@\
- InstallLibrary(libname,dest)
- #endif /* InstallSharedLibrary */
-
- /*
- * InstallSharedLibraryData - generate rules to install the shared library data
- */
- #ifndef InstallSharedLibraryData
- #define InstallSharedLibraryData(libname,rev,dest)
- #endif /* InstallSharedLibraryData */
-
- /*
- * SharedCplusplusLibraryTarget - generate rules to create a shared C++
- * library; use $(CXXLINK) instead of $(LD) in case the library needs
- * global constructors to be called.
- *
- * Not tested yet; send any bug fixes to fresco@x.org.
- */
- #ifndef SharedCplusplusLibraryTarget
- #define SharedCplusplusLibraryTarget(libname,rev,solist,down,up,need_libs) @@\
- AllTarget(Concat(lib,libname.a)) @@\
- @@\
- Concat(lib,libname.a): solist $(UNSHAREDOBJS) @@\
- $(RM) $@~ shr.o @@\
- $(AR) $@~ solist @@\
- dump -g $@~ | sed -n -e 's/^[ ]*[0-9][0-9]*[ ]*\([^ .][^ ]*\)$$/\1/p' > $@.syms @@\
- $(CXXLINK) -o shr.o $@~ -H512 -T512 -bM\:SRE -bE\:$@.syms need_libs BaseShLibReqs -L$(USRLIBDIR) @@\
- $(RM) $@~ @@\
- $(AR) $@~ shr.o $(UNSHAREDOBJS) @@\
- $(RM) $@.syms $@ shr.o @@\
- $(MV) $@~ $@ @@\
- @@\
- clean:: @@\
- $(RM) Concat(lib,libname.a)
-
- #endif /* SharedCplusplusLibraryTarget */
-
- /*
- * NormalSharedLibraryTarget - generate rules to create a shared library;
- * build it into a different name so that the we do not hose people by having
- * the library gone for long periods.
- */
- #ifndef SharedLibraryTarget
- #define SharedLibraryTarget(libname,rev,solist,down,up) @@\
- AllTarget(Concat(lib,libname.a)) @@\
- @@\
- Concat(lib,libname.a): solist $(UNSHAREDOBJS) @@\
- $(RM) $@~ shr.o @@\
- (cd down; $(AR) up/$@~ solist) @@\
- dump -g $@~ | sed -n -e 's/^[ ]*[0-9][0-9]*[ ]*\([^ .][^ ]*\)$$/\1/p' > $@.syms @@\
- $(LD) -o shr.o $@~ -H512 -T512 -bM\:SRE -bE\:$@.syms $(REQUIREDLIBS) BaseShLibReqs -L$(USRLIBDIR) @@\
- $(RM) $@~ @@\
- $(AR) $@~ shr.o $(UNSHAREDOBJS) @@\
- $(RM) $@.syms $@ shr.o @@\
- $(MV) $@~ $@ @@\
- LinkBuildLibrary($@) @@\
- @@\
- clean:: @@\
- $(RM) Concat(lib,libname.a)
-
- #endif /* SharedLibraryTarget */
-
- /*
- * SharedLibraryDataTarget - generate rules to create shlib data file;
- */
- #ifndef SharedLibraryDataTarget
- #define SharedLibraryDataTarget(libname,rev,salist)
- #endif /* SharedLibraryTarget */
-